In order to create sound objects correctly, the mks4agb.ini file must be correctly written. Using any general-use text editor, set up the parameters in the mks4agb.ini file. The mks4agb.ini file contains comments (the portions following the semicolons ";") so be sure to read those also. |
INDEX Writing in the mks4agb.ini File
(1) rebuild = Rebuild Switch (2) aif_dir = Waveform Data Input Directory (3) mid_dir = Song Data Input Directory (4) src_dir = Source File Directory (5) out_dir = Output Directory (6) agb_lib = AGB System Library File Directory (7) cmd_path = GCC Execution Path (8) mode_i = Initial Setup Values for the Sound Modes (9) vgroup = Begin Tone Color Group Setup (10) p??? = Tone Color Setup *Tone Color Type A or F (Direct Sound) Setup P or Q (CGB Compatible Sound) Setup R (Rhythm Set) Setup S (Key Split Tone Color) Setup (11) t??? = Key Split Table Setup (12) w??? = Sound 3 Waveform Setup (13) mp??? = Music Player Setup (14) s??? = Song Setup (15) pbymidi = MIDI Input Performance Setup (16) memacc_s = Memory Access Area Size (17) max_line = Maximum Lines for Processing Time of m4aSoundMain() (18) only_dma1 = DMA Limit Switch (19) sys_rom = System ROM Use Switch |
(2) aif_dir = Waveform Data Input DirectoryThis specifies the directory where the waveform data file(s) {wavename}.aif are to be placed. |
(3) mid_dir = Song Data Input DirectoryThis specifies the directory where the song data file(s) {songname}.mid are to be placed. |
(4) src_dir = Source File DirectoryThis specifies the directory where .s files and other files are output. |
(5) out_dir = Output DirectoryThis specifies the directory where .o files and other files are output. |
(7) cmd_path = GCC Execution PathThis writes the run path of the GCC or other compilers. Under normal conditions, please list the directory specified in the final path of the agb_c2s.bat file. |
(8) mode_i = Initial Setup Values for the Sound Modes(Syntax) max_ch : 1~12 Number of Simultaneously-Produced Direct Sounds m_vol : 1~15 Direct Sound Master Volume freq : 5734-42048 Direct Sound Playback Frequency DA_bit : 9-6 Final Output D/A Conversion Bit Count (Syntax Example) |
Number of Simultaneously-Produced Direct Sounds (max_ch : 8)1 ~ 12. This specifies the number of simultaneously-produced direct sounds. For more information, refer to the section, Number of Simultaneously-Produced Direct Sounds. (Default Value: 8) |
Direct Sound Playback Frequencies (freq : 21024)5734 ~ 42048. This specifies the direct sound playback frequencies. For more information, please refer to the section Direct Sound Playback Frequencies. Note that when these figures are not rated levels, the nearest rated level will be selected automatically by internal logic. |
Final Output DA Conversion Bit Count (DA_bit : 8)9 ~ 6. This specifies the final output DA conversion bit count. For more information, please refer to the section Sound Output DA Conversion Bit Count (Frequency). |
(9) vgroup = Tone Color Group Number SetupThe Tone Color Setup (p???) written after these settings are registered as "Tone Color Groups" having the number specified here. (Initial Value of "0.") (Example) vgroup = 0 p000 = ..... (Tone Color Setup for Tone Color Group 0,Tone Color Number 0.) ~ p015 = ..... (Tone Color Setup for Tone Color Group 0, Tone Color Number 15.) vgroup = 1 p000 = ..... (Tone Color Setup for Tone Color Group 1, Tone Color Number 0.) ~ Also, for each unit of Song Data, one Tone Color Group will be specified for use. |
(10) p??? = Tone Color SetupThese are the settings corresponding to the MIDI Program Change Numbers. The tone colors having the numbers specified as Program Change Numbers in the Song Data file will be output. (In the .sFile it is the number next to the "VOICE" label.) Tone Color Types A Direct Sound |
A or F (Direct Sound) Setup(Syntax) wave : .AIF file AIFF File Name attack : 0 ~ 99 Attack Speed (99= Fastest) decay : 0 ~ 99 Decay Speed (99= Fastest) sustain : 0 ~ 99 Sustain Level (99= Maximum) release : 0 ~ 99 Release Speed (99= Maximum) rhykey : 0 ~ 127 (C-2 ~ G8) Scale Produced When Rhythm Set Used rhypan : off, -64 ~ 63 Panpot When Rhythm Set Used comp : 0.1 ~ 1 Sampling Sound Compression Rate (Syntax) This type of tone color outputs a sampled waveform using direct sound. |
Tone Color Number (p??? : p000)
|
Tone Color Type (type : A)
|
Waveform File Name (wave : sample.aiff)
|
Attack Speed (attack : 96)0 ~ 99 The larger the number, the faster the start up.(Default Value: 99.) A or F |
Decay Speed (decay : 60)0 ~ 99. The larger the number, the faster the attenuation. (Default Value: 99.) A or F |
Sustain Level (sustain : 60)0 ~ 99. The larger the number, the greater the level.(Default Value: 99.) A or F |
Release Speed (release : 90)0 ~ 99. The larger the number, the faster the attenuation. (Default Value: 99.) A or F |
Scale Produced when Rhythm Set Used (rhykey : 60)0 ~ 127 (C - 2 ~ G8) When the current Tone Color Group is used as the Rhythm Set, the scale that this tone color is produced with. (Default Value: 60.) A or F |
Panpot when Rhythm Set Used (rhypan : off)-64 ~ 63 or off. When the current Tone Color Group is used as the Rhythm Set, the panpot of this tone color. When "off" it is produced with that track's panpot.(Default Value: off.) A or F |
Compression Rate (comp : 1)0.1 ~ 1. Compresses waveform data. However, compression (rate down) using waveform editing software yields better sound quality.(Default Value: 1.) A or F |
The above syntax examples can be written in abbreviated form as follows.
(Example of Abbreviated Syntax) A or F |
P or Q (CGB Compatible Sound) Setupp??? = type, wave, attack, decay, sustain, release, rhykey, rhypan, length, sweep wave : sc????? Waveform Name attack : 0 ~ 99 Attack Speed (99= Fastest) decay : 0 ~ 99 Decay Speed (99= Fastest) sustain : 0 ~ 99 Sustain Level (99= Maximum) release : 0 ~ 99 Release Speed (99= Fastest) rhykey : 0 ~ 127 (C-2 ~ G8) Scale Produced when Rhythm Set Used rhypan : off, -64 ~ 63 Panpot when Rhythm Set Used length : 0 ~ 63 (~ 255(sc3)) Length Data (0= Continuous) sweep : 0 ~ 7F (Hexadecimal) Sweep (only for sc1)(0= Off) *When the "sweep" is on, the "rhypan" settings are "off." (Syntax Example) p000 = P, sc1dt50, 99, 80, 85, 64, 60, off, 0, 0 ; (Sound 1) p001 = P, sinewave, 99, 80, 85, 64, 60, off, 0, 0 ; (Sound 3) This type is the tone color that outputs timbre using CGB compatible sound. |
Tone Color Number (p??? : p000)
|
Tone Color Type (type : P)
|
Waveform Name (wave : sc1dt50, sinewave)sc1dt??: Sound 1 Duty (?? = 12,25,50,75 (%)) P or Q |
Attack Speed (attack : 99)0 ~ 99 (However, this is actually 7 stages due to hardware limitations.) P or Q |
Decay Speed (decay : 80)0 ~ 99 (However, this is actually 7 stages due to hardware limitations.) P or Q |
Sustain Level (sustain : 85)0 ~ 99 (However, this is actually 15 stages due to hardware limitations.) P or Q |
Release Speed (release : 64)0 ~ 99 (However, this is actually 7 stages due to hardware limitations.) P or Q |
Scale Produced when the Rhythm Set is Used (rhykey : 60)00 ~ 127 (C - 2 ~ G8). The scale that this tone color is produced with when the current tone color groups are used as the rhythm set. (Default Value: 60.) P or Q |
Panpot when the Rhythm Set is Used (rhypan : off)-64 ~ 63 or off. The panpot that this tone color will be produced with when the current tone color groups are used as the rhythmset. When "off," it will be produced with the panpot for that particular track. (Default Value: off.) P or Q |
Length Data (length : 0)0 ~ 63 (For Sound 3, 0 ~ 255). Determines how many 256ths of a second a note will be. When "0," it does not function. (Default Value: 0.) P or Q |
Sweep Value (sweep : 0)00 ~ 7F (Hexadecimal). This is the value written into the hardware register "0x04000060" and is only valid for Sound 1. When "0," it does not function. P or Q |
When the above examples are abbreviated, they can be written as follows. (Example of Abbreviated Syntax) P or Q |
Tone Color Group to be Used as the Rhythm Set (vgroup) (vgroup : 1)0 ~ 999. There will be a one to one correspondence between the tone colors selected in the vgroup and their corresponding tracks. |
Lower MIDI Key Number Limit (btmkey : c1)0 ~ 127 (C - 2 ~ G8). Here, the MIDI Key Number Setup will correspond to p000. |
Key Split Table Number (table : 0)0 ~ 31. This sets the number of the Key Split Table described below. Here, there is a one to one correspondence between each of the elements within the selected table and the scale for that track. |
Tone Color Groups Used as Key Split Tone Colors (vgroup) (vgroup : 2)0 ~ 999. The scale of a track is first converted to a tone color number using the Key Split Table and, ultimately, a tone color in the vgroup selected here will be selected. |
Lower MIDI Key Number Limit (btmkey : c1)0 ~ 127 (C - 2 ~ G8) MIDI Key Numbers specified here correspond to the initial elements in the Key Split Table. For example, if C1 were specified here, the relationship between the scale and the tone color would take the order C1 = T??? [0], C#1 = t??? [1], D1 = t??? [2]... (Default Value: 0 (C-2). |
Waveform Data Array (data_array : 0011235689ACDEEFFFEEDCA986532110)This 32-character hexadecimal registers the waveform. |
Label Name (label : sinewave)16 single-byte alphanumerics or less. This label name is a Waveform Name in the Tone Color Setup described above, and may be used instead of the "sc3w???." (May be omitted.) |
(13) mp?? = Music Player Setup(Syntax) mp?? = track mp?? : mp00 ~ mp31 Music Player Number track : 1 ~ 16 Number of Tracks (Syntax Example) mp00 = 8 mp01 = 6 |
Music Player Number (mp?? : mp00)These are two-digit, single-byte Music Player numbers. The values "000 ~ 031" may be used. These numbers do not have to be consecutive, but the same number may not be used more than once. |
Number of Tracks (track : 8)Indicates the maximum number of tracks that the player in question can play and follows "mp?? = ." |
(14) x??? = Song Setup(Syntax) s??? = filename, m_player, vgroup, master_vol, priority, reverb, options s??? : s000 ~ s999 Song Number filename : .MID file MIDI File Name m_player : 0 ~ 31 Music Player Used during Performance vgroup : 0 ~ 999 Tone Color Groups Used during Performance master_vol : 0 ~ 127 Master Volume priority : 0 ~ 255 Priorities reverb : off, 0 ~ 127 Reverb (No change if off.) options : -x Doubles the resolution. : -e Doesn't shorten the gate time. : -n Doesn't compress the sheet music data. (Syntax Example) s000 = m_samp.mid, 0, 0, 100, 0, off, -e Registers the Song Data. |
Song Number (s??? : s001)The "???" in "s???" is a single-byte numeral for the song number. Numbers from 000 ~ 1999 can be used. These numbers do not have to be consecutive, but the same number cannot be used more than once. |
Music Player Number (m_player : 0)0 ~ 31. The music player number used when playing the song data in question. |
Tone Color Group (vgroup : 0)0 ~ 999. The Tone Color Group Number used when playing the song data in question. |
Priority (priority : 0)0 ~ 255. The sound production priorities when playing on a music player. |
Option (options : -e)This is an option used when converting a .mid File to an .s File. The following functions can be specified. |
MIDI Input Performance Switch (switch : 0)0 or 1. When creating normal game sound data use 0, for MIDI input performance use 1. (If omitted 0) |
Tone Color Groups Used with MIDI Input Performance (vgroup : 0)0 ~ 999. Tone color group number used with MIDI input performance. (Default Value: 0.) |
Master Volume for MIDI Input Performance (master_vol : 120)0 ~ 127. Master volume for the entire track for MIDI Input Performance. (Default Value: 127.) |
Priorities for MIDI Input Performance (priority : 200)0 ~ 255. Sound production priorities for MIDI input performance. (Default Value: 255.) |
Tempo of MIDI Input Performance (tempo : 120)2 ~ 510. Tempo information cannot be obtained from the MIDI-IN signal, so pseudo-tempo settings are made here. These values affect the LFO speeds (modulation and other features). |
(16) memacc_s = Memory Access Area Size(Syntax Example) |
(17) max_line = Maximum Lines for Processing Time of m4aSoundMain()(Syntax Example) |
(18) only_dma1 = DMA Limit Switch(Syntax Example) This system normally uses 2 channels for the AGB DMA function. When a value other than 0 is set here, it will only use one channel. Then the output of the direct sound becomes monaural, but the processing time becomes faster. If a programmer requests, enable this switch. |
(19) sys_rom = System ROM Use Switch(Syntax Example) |
Next:[ Number of Music Player Tracks ] Back:[ Making Song Data ] Top :[ Table of Contents ] |